<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Assan help file</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
        <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css">
        <link href="css/style.css" rel="stylesheet" type="text/css">
    </head>
    <body>
               <header class="navbar navbar-static-top navbar-default" id="top" role="banner">
            <div class="container">
                <div class="navbar-header">
                    <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a href="https://wrapbootstrap.com/theme/assan-clean-multipurpose-template-WB05F069P" class="navbar-brand">Assan 1.7.5</a>
                </div>
                <nav class="collapse navbar-collapse bs-navbar-collapse">
                    <ul class="nav navbar-nav">
                        <li class="active">
                            <a href="index.html">Basics</a>
                        </li>
                        <li>
                            <a href="install.html">Install</a>
                        </li>
                        <li>
                            <a href="css.html">CSS</a>
                        </li>                       
                        <li>
                            <a href="contact.html">Contact forms</a>
                        </li>
                        <li>
                            <a href="change-log.html">Change Log</a>
                        </li>
                    </ul>
            
                </nav>
            </div>
        </header>
        <div class="banner" style="background-color: #f5f5f5;padding-bottom: 20px;">
            <div class="container">
                <h1>Contact forms</h1>
                <p>
                    How to make working contact form for my website using assan forms 
                </p>
            </div>
        </div>

        <div class="page-content">
            <div class="container">
                <div class="simple-box">
                    <h1>Simple Contact form in <span class="color">contact-default.html</span></h1>
                    <h4>Require files </h4>
                    <pre>  <!--cantact form script-->
&lt;script src="js/contact_me.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/jqBootstrapValidation.js" type="text/javascript">&lt;/script>
mail/contact_me.php
                    </pre>
                    <br>
                    <h4>where to add my email</h4>
                    <pre>
  &lt;?php
// check if fields passed are empty
if(empty($_POST['name'])  		||
   empty($_POST['email']) 		||
   empty($_POST['message'])	||
   !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
   {
	echo "No arguments Provided!";
	return false;
   }
	
$name = $_POST['name'];
$email_address = $_POST['email'];
$message = $_POST['message'];
	
// create email body and send it	
$to = 'emailme@myprogrammingblog.com'; // SET YOUR MAIL HERE
$email_subject = "Contact form submitted by:  $name";
$email_body = "You have received a new message. \n\n".
				  " Here are the details:\n \nName: $name \n ".
				  "Email: $email_address\n Message \n $message";
$headers = "From: contacts@myprogrammingblog.com\n";
$headers .= "Reply-To: $email_address";	
mail($to,$email_subject,$email_body,$headers);
return true;			
?&lt;
                    </pre>
                    <p>
                        Replace your mail id with this line <span class="color">$to = 'emailme@myprogrammingblog.com'; // SET YOUR MAIL HERE</span>
                        <br>
                        Replace header with your Email (Not remove /n) <span class="color">$headers = "From: mylifedesign143@gmail.com\n";</span>
                    </p>
                    <br>
                    <h4>Face this problem</h4>
                    <p>
                        Sorry user, it seems that my mail server is not responding. Please try again later!
                    </p>
                    <p>
                        Most of users face this problem. i have a quick solution for this this issue.<br>
                        1- Copy <span class="color">contact_me.php</span> file and paste into your site root folder<br>
                        2- Open <span class="color">contact_me.js</span> file<br>
                        3- Replace the style of path - <span class="color">url: "contact_me.php",</span><br>
                        4- its work 100%, as i check, Cheers<br>
                        5- if you have still facing any issues contact me at - mylifedesign143@gmail.com
                    </p>
                </div>

                <div class="simple-box">
                    <h1>Sky forms pro (Recommended)</h1>
                    <p> 1 - Other 3 contact pages based on sky forms pro<br>2 - file extention must be .php<br> 3 - your form must be on online server if you want to receive emails</p>
                    <br><br>
                    <h4>Require files </h4>
                    <pre>  <!--cantact form script-->
&lt;script src="sky-form/js/jquery.form.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="sky-form/js/jquery.validate.min.js" type="text/javascript">&lt;/script>
&lt;script src="js/sky-forms-custom.js" type="text/javascript">&lt;/script>
CSS
&lt;link href="sky-form/css/sky-forms.css" rel="stylesheet">
mail/contact_me.php
                    </pre>
                    <br>
                    <h4>where to add my email</h4>
                    <p>Open > sky-form > php_files > demo-contacts-process.php</p>
                    
                    <pre>
&lt;?php
session_start();
if( isset($_POST['name']) && strtoupper($_POST['captcha']) == $_SESSION['captcha_id'] )
{
	$to = 'youremailhere@gmail.com'; // Replace with your email	
	$subject = 'Message from website'; // Replace with your $subject
	$headers = 'From: ' . $_POST['email'] . "\r\n" . 'Reply-To: ' . $_POST['email'];	
	
	$message = 'Name: ' . $_POST['name'] . "\n" .
	           'E-mail: ' . $_POST['email'] . "\n" .
	           'Subject: ' . $_POST['subject'] . "\n" .
	           'Message: ' . $_POST['message'];
	
	mail($to, $subject, $message, $headers);	
	if( $_POST['copy'] == 'on' )
	{
		mail($_POST['email'], $subject, $message, $headers);
	}
}
?&lt;
                    </pre>
                    <p>Put your email on this line <span class="color">$to = 'youremailhere@gmail.com'; // Replace with your email	</span></p>
                </div>
            </div>
        </div>

        <div class="container text-center" style="margin-top: 100px;padding: 20px;">&copy; 2015.Assan 1.7.5, Design_mylife</div>

        <script type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript" src="js/bootstrap.min.js"></script>
    </body>
</html>
